1. Field of the Invention
The present invention relates to the field of the recording of compressed and scrambled digital data. It is more particularly concerned with a method of recording scrambled digital data and a method of reading such data.
2. Description of the Related Art
Devices for recording compressed digital data streams in particular for recording digital television signals have now been around for some time. This type of device, which takes the form for example of a hard disk, thus offers the users the ability to record digital television programs that they can subsequently read back as they used to do previously with their video recorder for analogue television programs.
When data are recorded, in particular television programs, an attractive functionality consists in reading back these data according to particular modes of reading often referred to by the term “trick play modes”, such as “backward play” or “fast forward” or even accelerated backward play. Another attractive mode consists in directly accessing a specific part of a program or in being able to make “jumps” in the data.
These modes of reading are not always easy to implement with digital data compressed and coded, for example according to the MPEG-2 standard. Specifically, the compression and coding techniques have been designed to be used essentially for the transmission of digital data. Consequently, it is envisaged that the decoding of the data be done in “forward play” mode at normal speed. When digital audio/video data compressed and coded according to the MPEG-2 standard has to be read in backward play mode for example, it may be necessary, in order to display certain images, to decode several images before being capable of displaying one of them.
When the recorded digital data are scrambled (one also speaks of “enciphered” or “encrypted” data), it is even more difficult to implement the “trick play” modes. It is in fact necessary to retrieve the descrambling keys before being able to descramble, then decode the data. According to the most conventional method of scrambling used in the field of digital pay-TV, the data descrambling keys are transmitted, in the digital data stream, in data packets denoted ECM (standing for “Entitlement Control Message”). The keys used to scramble the data (and which serve also to descramble them) are denoted CW (standing for “Control Word”) and are changed periodically, typically every 10 seconds. The ECMs are transmitted in the data stream by being repeated every 100 ms for example and their content changes roughly every 10 seconds. In order to descramble a digital data packet, it is therefore necessary to retrieve firstly an ECM containing the CW key for descrambling this data packet.
An ECM customarily contains two CW keys: an even key and an odd key. The digital data transport packets, coded in particular according to the DVB standard (standing for “Digital Video Broadcasting”) or according to the standard of the ATSC (standing for “Advanced Television Systems Committee”) contain, in a header, a scrambling indicator (or “flag”) indicating whether or not the packet is scrambled and if it is, whether it is scrambled with the even or odd key. An ECM therefore always contains the CW key necessary for descrambling the next data packet transmitted in the stream. The second CW key that it contains is useful, either for descrambling certain data packets transmitted before the ECM in the data stream, or for descrambling certain data packets transmitted after the ECM in the stream.
FIG. 1 diagrammatically illustrates this principle. We have represented a data stream 10 scrambled with various CW keys. We assume that the data packets 100 corresponding to the period n−1 have been scrambled with the key CWn−1, the data packets 101 corresponding to the period n have been scrambled with the key CWn and the data packets 102 corresponding to the period n+1 have been scrambled with the key CWn+1. Each “key period” which corresponds to the period during which a key is used to scramble the data lasts, according to the example of FIG. 1, 10 seconds.
In FIG. 1 we have also represented the ECMs which are transmitted in this data stream. For greater clarity, they are represented separately from the data stream but of course the ECMs are transmitted in practice in the data stream. They are transmitted, in the example represented in FIG. 1, every 100 ms and each contain, as made explicit at the bottom of FIG. 1, two CW keys. These keys are represented diagrammatically with crosshatching or square hatching corresponding to the period for which they are used to scramble the data of the stream 10. In FIG. 1, only period n is represented in full, accompanied by the end of period n−1 and by the start of period n+1.
As illustrated in FIG. 1, during a period n, the content of the ECMs transmitted in the data stream alters: at the start, the ECMs contain the key CWn−1 corresponding to the previous period and the key CWn corresponding to the current period. Then, their content is modified and they contain the key CWn corresponding to the current period and the key CWn+1 corresponding to the next period. The period during which a key CW is transmitted in the ECMs before the stream of data scrambled with this key CW is transmitted is referred to as “ECM Advance”. This ECM Advance can last between 0 and the duration of the key period (10 s).
It may therefore be noted that, according to the direction of reading of the data stream and according to the reading speed, it may in certain cases be difficult to recover the CW key necessary in order to descramble the data before receiving the data. Specifically, it should be pointed out that the CW keys are transmitted in the ECMs by being encrypted and that they have to be decrypted, generally in a smart card linked up to the device for receiving the data stream, before being utilizable by this device for the descrambling of the data.
Document EP 1 143 722 A1 proposes a solution for facilitating the backward-play reading of this type of data stream consisting in inserting three CW keys into each ECM: a key for the current period, a key for the previous period and a key for the next period. This solution is not however satisfactory for the accelerated modes of reading (fast forward or accelerated backward play) and neither does it make it possible to perform fast “jumps” from one data block to another in a digital data stream.